home *** CD-ROM | disk | FTP | other *** search
/ SGI Developer Toolbox 6.1 / SGI Developer Toolbox 6.1 - Disc 1.iso / toolbox / src / tutorials / OGLT / Examples / TerrainFollowing / src.hansen / data.h < prev    next >
Encoding:
C/C++ Source or Header  |  1996-11-11  |  3.5 KB  |  84 lines

  1.  /**************************************************************************
  2.   *                                                                        *
  3.   *               Copyright (C) 1996, Silicon Graphics, Inc.               *
  4.   *                          All Rights Reserved.                          *
  5.   *                                                                        *
  6.   *  The files in this subtree  contain  UNPUBLISHED  PROPRIETARY  SOURCE  *
  7.   *  CODE of Silicon Graphics, Inc.;  the  contents  of  these  files may  *
  8.   *  not be disclosed to third  parties,  copied  or  duplicated  in  any  *
  9.   *  form, in whole or in part,  without  the  prior  written  permission  * 
  10.   *  of  Silicon Graphics, Inc.                                            *
  11.   *                                                                        *
  12.   *  RESTRICTED RIGHTS LEGEND:                                             *
  13.   *  Use,  duplication  or  disclosure  by  the  Government is subject to  *
  14.   *  restrictions as set forth in subdivision (c)(1)(ii) of the Rights in  *
  15.   *  Technical Data and Computer Software clause at  DFARS  252.227-7013,  *
  16.   *  and/or in similar or successor  clauses in the FAR,  DOD or NASA FAR  *
  17.   *  Supplement.  Unpublished - rights reserved  under the Copyright Laws  *
  18.   *  of the United States.                                                 *
  19.   *                                                                        *
  20.   *  THIS SOFTWARE IS  PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND,  *
  21.   *  EXPRESS,  IMPLIED OR  OTHERWISE,  INCLUDING  WITHOUT LIMITATION, ANY  *
  22.   *  WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.      *
  23.   *                                                                        *
  24.   *  IN  NO  EVENT  SHALL  SILICON  GRAPHICS  BE  LIABLE FOR ANY SPECIAL,  *
  25.   *  INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF  ANY  KIND,  OR ANY  *
  26.   *  DAMAGES WHATSOEVER RESULTING FROM LOSS  OF  USE,  DATA  OR  PROFITS,  *
  27.   *  WHETHER OR NOT ADVISED OF  THE  POSSIBILITY  OF  DAMAGE,  AND ON ANY  *
  28.   *  THEORY OF LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR  *
  29.   *  PERFORMANCE OF THIS SOFTWARE.                                         *
  30.   **************************************************************************/
  31.  
  32. /*
  33.     Author : Paul Hansen          & Patrick Bouchaud
  34.              hansen@engr.sgi.com    galaad@neu.sgi.com
  35. */
  36.  
  37. #define SUP(a,b)    ( (a)<(b) ? (b) : (a) )
  38. #define INF(a,b)    ( (a)>(b) ? (b) : (a) )
  39. #define DEG2RAD(D)  ((3.14159265358 / 180.0) * (D))
  40.  
  41. #define NUM_LATITUDE        920
  42. #define D_LATITUDE            66.76678    /* in meters */
  43. #define INV_DLAT            (1/66.76678)    /* in meters */
  44. #define LAT_STRIDE            4
  45.  
  46. #define NUM_LONGITUDE        650
  47. #define D_LONGITUDE            92.63999    /* in meters */
  48. #define LON_STRIDE            4
  49. #define INV_DLON            (1/92.63999)    /* in meters */
  50.  
  51. #define    RADADA                50.
  52.  
  53. #define    IMAGE_WIDTH        6000
  54. #define    IMAGE_HEIGHT    6000
  55. #define    TEXTURE_WIDTH    512
  56. #define    TEXTURE_HEIGHT    512
  57. #define TILE_WIDTH        256
  58. #define TILE_HEIGHT        256
  59. #define    MAXLEV    9
  60. #define NUMQUAD 2
  61. #define NUMTILE_S 12
  62. #define NUMTILE_T 12
  63. #define    NUMTEX    (NUMTILE_S*NUMTILE_T)
  64. #define MAXGRID_LAT (NUM_LATITUDE/NUMTILE_S/2+1)
  65. #define MAXGRID_LON (NUM_LONGITUDE/NUMTILE_T/2+1)
  66. #define ISCALE_S 0.02550326
  67. #define ISCALE_T 0.03611325
  68.  
  69. typedef struct {
  70.     float matrix[4][4];
  71.     } matrixRec;
  72.  
  73. #ifdef MAIN_PROGRAM
  74.  
  75. float far_cull_dist, near_cull_dist;
  76. float Terrain[NUM_LATITUDE][NUM_LONGITUDE];
  77.  
  78. #else    /* MAIN_PROGRAM */
  79.  
  80. extern float far_cull_dist, near_cull_dist;
  81. extern float Terrain[NUM_LATITUDE][NUM_LONGITUDE];
  82.  
  83. #endif    /* MAIN_PROGRAM */
  84.